package generics.decorator;

class Flood{
	private String name;
	public void guide(String name){
		this.name = name;
	}
}

class SimpleDecorator extends Flood{
	
	protected Flood flood;
	public SimpleDecorator(Flood flood){
		this.flood = flood;
	}
	@Override
	public void guide(String name) {
		flood.guide(name);
	}
}

class Milk extends SimpleDecorator{
	public Milk(Flood flood) {
		super(flood);
	}
	public String whatItIs(){
		return "Milk";
	}
}

class Coffee extends SimpleDecorator{
	public Coffee(Flood flood) {
		super(flood);
	}
	public String whatItIs(){
		return "Coffee";
	}
}


public class SimpleDecoration {
	public static void main(String[] args) {
		Milk milk = new Milk(new Coffee(new Flood()));
		System.out.println(milk.whatItIs());
		milk.guide("");
	}
	
}
